package com.uchiha.nova.mainService.props;

import cn.hutool.jwt.JWT;
import cn.hutool.jwt.JWTUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author 周林静
 * @Date 2025-03-28 13:42
 * @Version 1.0
 */
@Slf4j
public class AuthUtil {
    public static NovaUser getUserByToken(String token) {
        final JWT jwt = JWTUtil.parseToken(token);
        NovaUser novaUser = jwt.getPayload().getClaimsJson().toBean(NovaUser.class);
        return novaUser;
    }
}
